﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace SGRapidForm.Common
{
    /// <summary>
    /// 所有数据实体的基类
    /// </summary>
    [DataContract]
    public class EntityBase
    {
        public string IsValid()
        {
            return null;
        }

        public void EnsureItemIsOK()
        {
            string error = this.IsValid();
            if (string.IsNullOrEmpty(error) == false)
                throw new FishWebLib.MyMessageException(error);
        }
    }
}
